/**
 * Created by yuming619 on 2018/1/18.
 */
angular.module('component.alert')
    .controller("AlertComponentController",AlertComponentController);
AlertComponentController.$inject = [];
function AlertComponentController(){
    var vm = this;
    vm.cancel =  cancel;
    vm.btnDisable = btnDisable;
    //console.log(vm.data);
    //if(!vm.data.inputType){
    //    vm.data.inputType = "text";
    //}
    ///////////////////////////////////////////

    function cancel(){
       vm.alertVisible = false;
    }

    function btnDisable(data,term){
        if(term){
            var myreg = term;
            if(!data || (data && !myreg.test(data))){
                return true
            }
        }
    }
}